{% extends "@EasyWorkflow/base.html.twig" %}
{% block content %}
    <!-- content -->
    <div class="col-md-10">
        <div class="row">
            <div class="col-lg-12">
                <div class="page-header">
                    <h1>用户管理</h1>
                </div>
            </div>
        </div>
        {% include '@EasyWorkflow/_flash_messages.html.twig' %}
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="text-muted bootstrap-admin-box-title">新增用户</div>
                    </div>
                    <div class="bootstrap-admin-panel-content text-muted" style="padding: 60px 0;">
                        <div class="row">
                            <div class="col-md-6 col-md-offset-3">
                                <form action="{{ path('easyworkflow_user_create') }}" method="post">
                                    <div class="form-group">
                                        <label for="userName"><span class="text-danger">*</span> 登录名</label>
                                        <input type="text" name="userName" class="form-control" id="userName" placeholder="群组名称" value="{% if user %}{{ user.userName }}{% endif %}">
                                    </div>
                                    <div class="form-group">
                                        <label for="group"><span class="text-danger">*</span> 群组</label>
                                        <div class="input-group">
                                            {% for role_key,role in group %}
                                                <label class="checkbox-inline">
                                                    <input type="checkbox" name="roles[{{ role_key }}]" value="{{ role }}"> {{ role }}
                                                </label>
                                            {% endfor %}
                                        </div>
                                    </div>
                                    <button type="submit" class="btn btn-primary btn-sm"><i
                                                class="glyphicon glyphicon-hand-up"></i> 确定提交
                                    </button>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
